<?php include_once dirname(__FILE__).'/common/header.php'; ?>

<?php include_once dirname(__FILE__).'/common/menu.php'; ?>

var attr = <?php echo json_encode($attr) ?>;
var ctrlName = '<?php echo $ctrlName ?>';


list.statusFrm = function(r,msg,method){
    Ext.Msg.confirm('确认?',msg,function(btn) {
        if(btn != 'no') {
            ZM.ajax({
                url: list.baseUrl +  ctrlName + method,
                params:{customer_id:r.customer_id},
                mask:list.grid,
                success:function(res){
                    ZM.bo.msg('success!',res.detail);
                    list.grid.store.reload();
                }
            });
        }
    });
}

list.grid = new ZM.EditorGridPanel({
  url: list.baseUrl + 'customer/getCustomerRentalList',
  baseParams:{},
  columns:[
      {header:'ID',dataIndex:'customer_rental_id',filter:{}},
      {header:'用户ID',dataIndex:'customer_id',filter:{}},
      {header:'手机号',dataIndex:'customer_rental_phone',filter:{}},
      {header:'公司名称',dataIndex:'customer_rental_companey',filter:{}},
      {header:'姓名',dataIndex:'customer_rental_name',filter:{}},
      {header:'职务',dataIndex:'customer_rental_position',filter:{}},
      {header:'联系方式',dataIndex:'customer_rental_contract',filter:{}},
      {header:'邮箱',dataIndex:'customer_rental_email',filter:{}},
      {header:'租赁设备',dataIndex:'customer_rental_device_type',filter:{xtype:'combofield',options:[['全部']].concat(attr.rental_devices)}},
      {header:'租赁期限',dataIndex:'customer_rental_deadline',filter:{}},
      {header:'提交时间',dataIndex:'customer_rental_time_create',width:140,filter:{xtype:'daterangefield'}}
  ]
});



<?php include_once dirname(__FILE__).'/common/layout.php'; ?>
list.grid.store.load();
<?php include_once dirname(__FILE__).'/common/footer.php'; ?>
